<!DOCTYPE html>
<html lang="zh-Hans">

<head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>{% block title %}{% endblock %}</title>
    <link rel="prefetch" href="{{ url_for('static', filename='emularity/es6-promise.js') }}">
    <link rel="prefetch" href="{{ url_for('static', filename='emularity/browserfs.min.js') }}">
    <link rel="prefetch" href="{{ url_for('static', filename='emularity/loader.js') }}">
    <link rel="prefetch" href="{{ url_for('static', filename='emularity/dosbox/dosbox-sync.js') }}">
    <link rel="prefetch" href="{{ url_for('static', filename='emularity/dosbox/dosbox-sync.mem') }}">
    <link rel="prefetch" href="{{ url_for('static', filename='emularity/emularity_color_small.png') }}">
    <link rel="prefetch" href="{{ url_for('static', filename='js/game.js') }}">
    <link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
          integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
          crossorigin="anonymous">
</head>

<body>
<nav class="navbar sticky-top navbar-expand-lg navbar-light bg-light">
    <a class="navbar-brand" href="{{ url_for('index') }}">🎮</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
            aria-controls="navbarNavAltMarkup"
            aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
        <div class="navbar-nav mr-auto">
            <a class="nav-item nav-link" href="{{ url_for('index') }}">首页</a>
            <a class="nav-item nav-link" href="{{ url_for('games') }}">游戏列表</a>
            <a class="nav-item nav-link" href="{{ url_for('about') }}">关于</a>
        </div>
        <form class="form-inline my-2 my-lg-0" method="get" action="{{ url_for('search') }}">
            <input class="form-control mr-sm-2" type="search" name="q" placeholder="游戏名称" aria-label="Search" value="{% block search_query %}{% endblock %}">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>
        </form>
    </div>
</nav>

{% block main %}{% endblock %}

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
        crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
        crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
        crossorigin="anonymous"></script>

{% block footer %}{% endblock %}

</body>

</html>